package com.wd.mine.activity

import androidx.activity.viewModels
import androidx.recyclerview.widget.LinearLayoutManager
import com.wd.common.base.BaseActivity
import com.wd.common.bean.FollowBean
import com.wd.common.viewmodel.MyViewModel
import com.wd.mine.adapter.FollowAdapter
import com.wd.mine.databinding.ActivityMeFollowBinding

class MeFollowActivity : BaseActivity<ActivityMeFollowBinding,Any>() {
    private val viewModel : MyViewModel by viewModels()
    override fun getViewBinding() = ActivityMeFollowBinding.inflate(layoutInflater)
    private var followList = ArrayList<FollowBean.Result>()
    override fun initData() {
        binding.titleFollow.text = "我的收藏"
        viewModel.followList()
        followList.add(FollowBean.Result(1,20,"","沙漠中的一粒沙",0))
        followList.add(FollowBean.Result(1,20,"","白鹇",0))
        followList.add(FollowBean.Result(1,20,"","我不是装神",0))
        followList.add(FollowBean.Result(1,20,"","重生之我是萨米肉鸽高手",0))
        viewModel.meFollow.observe(this){
        }
        binding.meFollowRec.layoutManager = LinearLayoutManager(this)
        var adapter = FollowAdapter(this,followList)
        binding.meFollowRec.adapter = adapter
    }

}